package id.co.rho.scoring.cid.framework.math.evaluator.model.visitor;

import id.co.rho.scoring.cid.framework.math.evaluator.model.BinaryOpValueNode;
import id.co.rho.scoring.cid.framework.math.evaluator.model.MEValueNode;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by IntelliJ IDEA.
 * User: bungrudi
 * Date: 9/14/11
 * Time: 4:18 PM
 */
public class BinaryNodeWalker implements NodeWalker{
    @Override
    public Set<MEValueNode> getChildren(MEValueNode node) {
        BinaryOpValueNode n = (BinaryOpValueNode) node;
        HashSet res = new HashSet();
        res.add(n.getLeftOp());
        res.add(n.getRightOp());
        return res;
    }
}
